package com.example.studentportrait.controller.frontend.teacher;

import com.example.studentportrait.domain.ResponseResult;
import com.example.studentportrait.domain.entity.Activity;
import com.example.studentportrait.domain.entity.CompanyInternship;
import com.example.studentportrait.service.ActivityService;
import com.example.studentportrait.service.CompanyInternshipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/teacher")
public class ActivityController {

    @Autowired
    ActivityService activityService;

    /**
     * 教师端查询活动列表
     * @param pageNum
     * @param pageSize
     * @param status
     * @return
     */
    @GetMapping("/activityList")
    public ResponseResult activityList(Integer pageNum, Integer pageSize, Integer status){
        return activityService.activityList(pageNum,  pageSize,  status);
    }

    /**
     * 教师端审核活动
     * @param activity
     * @return
     */
    @PutMapping("/reviewActivityById")
    public ResponseResult<Activity> reviewActivityById(@RequestBody Activity activity){
        return activityService.reviewActivityById(activity);
    }
}
